/** \file
* System-independent implementations of the portable Thread class.
* This file is part of Chorus, available at
* http://code.google.com/p/chorus-twitter/ . This file and all associated files
* and derivative works are bound by the terms of the LGPL 3.0 license,
* available at http://www.gnu.org/licenses/lgpl-3.0-standalone.html .
* \par Subversion URL:
* \$URL: https://chorus-twitter.googlecode.com/svn/trunk/src/system/Thread.hpp $
* \version \$Rev: 63 $
* \date    \$Date: 2009-03-08 07:26:54 -0400 (Sun, 08 Mar 2009) $
*/

#include "config.h"
#include "system/Thread.hpp"

using namespace std;

list<Thread*> Thread::allthreads;

Thread::~Thread()
{
	// Terminate the thread before continuing.
	abort();

	uninit();

	// Destroy the thread call object.
	if (call)
	{
		delete call;
		call = 0;
	}
	allthreads.remove(this);
}
